home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: slac.comp.computefarm,comp.lang.c++
- Path: ganymede.SLAC.Stanford.EDU!gas
- From: gas@ganymede.SLAC.Stanford.EDU (Glenn A. Horton-Smith)
- Subject: To run on pinto's, code must link statically to libxlf.a
- Message-ID: <DoLEJn.Ls9@unixhub.SLAC.Stanford.EDU>
- Sender: news@unixhub.SLAC.Stanford.EDU
- Organization: Stanford Linear Accelerator Center
- Distribution: site
- Date: Thu, 21 Mar 1996 00:54:58 GMT
-
- Here is a strange gotcha that will probably only affect people who
- link Fortran packages (like HBOOK) into non-Fortran (C, C++) code, and
- possibly some others. It caused me some temporary confusion, so I
- thought I would share the solution.
-
- The Fortran run-time library file "libxlf.a" is not present in the
- /usr/lib directories of any of the pinto machines that I have checked.
- Therefore, although AIX allows for you to link to this library as a
- "sharable" (thereby reducing the size of your executable), you must
- not do this, or else your code will not run when submitted via bsub.
- You will get error messages like the following:
- Could not load program /u/ei/gas/my_analysis/pedestals
- Could not load library libxlf.a[shr.o]
- Error was: No such file or directory
-
- The xlf command itself links in libxlf.a statically be default, so
- pure Fortran code should work fine, unless you've made a special
- effort to have the library linked in the sharable manner. On the
- other hand, it seems that "g++" links in libraries as sharables
- whenever it can, unless you specify the "-static" option. Therefore,
- my C++ code which calls HBOOK failed as above when bsub'ed (but ran
- fine on morgan05) until I re-created the executable with the -static
- option.
-
- Hope that's helpful to someone.
- -Glenn
-